/* 
 * File:   Random.h
 * Author: ben
 *
 * Created on November 11, 2012, 1:32 PM
 */

#ifndef RANDOM_H
#define	RANDOM_H

#include "Locker.h"
#include <pthread.h>

class Random {
private:
    static bool isSeeded;
    static pthread_mutex_t randLocker;
public:
    /**
     * Seeds the random number generator. Not thread safe!
     */
    static void initSeed();
    /**
     * Generates a random number between 1-100
     * @return Generated number
     */
    static int getRandomNum(int upperLimit);
};

#endif	/* RANDOM_H */

